﻿using Microsoft.AspNetCore.Mvc.Filters;

namespace First_WebAPI.Filters
{
    public class ApiActionFilter : IAsyncActionFilter
    {
        public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
        {
            Console.WriteLine("开始执行行为过滤器1");
            await next(); 
            Console.WriteLine("开始执行行为过滤器2");
        }
    }
}
